import './assets/main.css'

import {createApp, reactive, ref} from 'vue'
import App from './App.vue';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import router from './router/index';

import DEFAULT_WORD from "@/language.js";
import MpcUtil from "@/util/MpcUtil.js";

const app = createApp(App);
app.use(ElementPlus);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(router);




app.provide('DEFAULT_WORD', DEFAULT_WORD);
// 是否显示
const isShow = reactive({
    registerDialog: false,
    logInDialog: true,
    signInDialog: false,
    forgotPassDialog: false,
    personalDialog: false, // 个人功能
    uploadAvatarDialog: false, // 上传头像
    topUpDialog: false, // 充值
    goldExchangeDialog: false, // 兑换金币
    buyMemberDialog: false, // 购买或续期会员
    messageDrawer: false, // 消息抽提
    messageCreateGroupDialog: false, // 消息创建群聊
    publishCommodityDialog: false, // 发布商品
    shareDialog: false, // 分享
});
app.provide('isShow', isShow);
const isLogin = ref(false);
app.provide('isLogin', isLogin);
const myUser = reactive({});
app.provide('myUser', myUser);
const myWallet = reactive({});
app.provide('myWallet', myWallet);
// 当前对话
const currentChat = reactive({});
app.provide('currentChat', currentChat);
// 是否需要分享
const shareContent = ref({});
app.provide('shareContent', shareContent);




app.mount('#app');
